package cn.tedu.order.management.dao.persist.repository.impl;

import cn.tedu.order.management.dao.persist.mapper.RefundMapper;
import cn.tedu.order.management.dao.persist.repository.RefundRepository;
import cn.tedu.order.management.pojo.entity.OrderRefund;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public class RefundRepositoryImpl implements RefundRepository {
    @Autowired
    private RefundMapper refundMapper;

    @Override
    public int addNew(OrderRefund orderRefund) {
        return refundMapper.addNew(orderRefund);
    }

    @Override
    public void updateById(Integer state,Long orderId) {
        refundMapper.updateByOrderId(state,orderId);
    }

    @Override
    public List<OrderRefund> getList() {
        return refundMapper.getList();
    }

    @Override
    public int updateByIdY(Long orderId) {
        return refundMapper.updateByIdY(orderId);
    }

    @Override
    public int updateByIdN(Long orderId) {
        return refundMapper.updateByIdN(orderId);
    }

}
